FROM ubuntu:latest

ADD . /app

RUN apt-get update && apt-get install -y \
    libdbus-1-3 \
    libfontconfig1 \
    libglib2.0-0  \
    libgl1-mesa-glx \
    libxi6 \
	wget
	
ADD . /app

WORKDIR /app
	
RUN wget https://download.robomongo.org/1.2.1/linux/robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz \
    && tar xvf robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz \
	&& rm -f robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz \
	&& mv robo3t-1.2.1-linux-x86_64-3e50a65 robo3t

RUN apt-get autoclean && apt-get autoremove

ENTRYPOINT ["/app/robo3t/bin/robo3t"]

#local
#    docker run --rm -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY -v /usr/share/X11/xkb:/usr/share/X11/xkb -d robo3t
#remote
#    docker run -e DISPLAY=10.0.75.1:0.0 --rm -v /usr/share/X11/xkb:/usr/share/X11/xkb -d robo3t
